<%@page contentType="text/html;charset=UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles" %>

<table class="table table-striped table-bordered">
  <thead>
    <tr>
      <th>Matrícula</th>
      <th>Salário</th>
      <th>Data Início</th>
      <th>Data Afastamento</th>
      <th>Ação</th>
    </tr>
  </thead>
  <tbody>
  	<c:forEach var="contratoAtual" items="${contratos}">
	    <tr>
	      <td><c:out value="${contratoAtual.matricula}" /></td>
	      <td><c:out value="${contratoAtual.nivel.valor}" /></td>
	      <td><c:out value="${contratoAtual.dataInicio}" /></td>
	      <td><c:out value="${contratoAtual.dataFim}" /></td>
	      <td>
	      	<c:url var="urlAtualizar" value="/pessoa/alterar-contrato/${contratoAtual.id}" />
	      	<a href="${urlAtualizar}" title="Alterar">
	      		<span class="glyphicon glyphicon-wrench"></span>
	      	</a>
	      	&nbsp;&nbsp;
	      	<a href="#" title="Excluir" id="${contratoAtual.id}" class="linkRemover">
	      	   <span class="glyphicon glyphicon-remove"></span>
	      	</a>
	      </td>	
	    </tr>
    </c:forEach>
  </tbody>
</table>

<script type="text/javascript" src="<c:url value="/resources/js/pessoa/contrato_lista.js" />"></script>